# read my plates
platesR3_1 <- read_tsv("data/JA_20200121-pRPS3-tRPS3mod-n1-ct.txt",skip=1) %>%
mutate(Well=Pos,Cq=Cp,ExpRep = 1,ExpRep=factor(ExpRep)) %>%
left_join(plateplanR3_1)
platesR3_2 <- read_tsv("data/JA_20200204-pRPS3-tRPS3mod-n2-ct.txt",skip=1) %>%
mutate(Well=Pos,Cq=Cp,ExpRep = 2,ExpRep=factor(ExpRep)) %>%
left_join(plateplanR3_2)
platesP1_1 <- read_tsv("data/JA_20200221_pPGK1-tRPS3mod-n1-ct.txt",skip=1) %>%
mutate(Well=Pos,Cq=Cp,ExpRep = 1, ExpRep=factor(ExpRep)) %>%
left_join(plateplanP1_1)
platesP1_2 <- read_tsv("data/JA_20200311-pPGK1-tRPS3mod-n2-ct.txt",skip=1) %>%
mutate(Well=Pos,Cq=Cp,ExpRep = 2,ExpRep=factor(ExpRep)) %>%
left_join(plateplanP1_2)
plates <- bind_rows(platesR3_1,platesR3_2,platesP1_1,platesP1_2)
summary(plates)
## Include Color Pos Name
## Mode:logical Min. : 255 Length:1536 Length:1536
## TRUE:1536 1st Qu.: 255 Class :character Class :character
## Median : 255 Mode :character Mode :character
## Mean : 8087
## 3rd Qu.: 255
## Max. :65280
##
## Cp Concentration Standard Status Well
## Min. : 8.97 Mode:logical Min. :0 Mode:logical Length:1536
## 1st Qu.:11.88 NA's:1536 1st Qu.:0 NA's:1536 Class :character
## Median :13.69 Median :0 Mode :character
## Mean :16.37 Mean :0
## 3rd Qu.:14.85 3rd Qu.:0
## Max. :46.78 Max. :0
## NA's :185
## Cq ExpRep WellR WellC
## Min. : 8.97 Length:1536 A : 96 1 : 64
## 1st Qu.:11.88 Class :character B : 96 2 : 64
## Median :13.69 Mode :character C : 96 3 : 64
## Mean :16.37 D : 96 4 : 64
## 3rd Qu.:14.85 E : 96 5 : 64
## Max. :46.78 F : 96 6 : 64
## NA's :185 (Other):960 (Other):1152
## SampleID Strain Pro_mCh Promoter
## Length:1536 Length:1536 Length:1536 Length:1536
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## mCherry BioRep Ter_mod Terminator
## Length:1536 Length:1536 Length:1536 Length:1536
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
##
## Construct remove Type TechRep TargetID
## modE :192 Mode :logical +RT:1152 1:768 mCh-7 :384
## modD :192 FALSE:1536 -RT: 384 2:384 PGK1-ORF:384
## modC :192 3:384 RPS3-ORF:384
## modB :192 URA3-ORF:384
## modA :192
## (Other):384
## NA's :192
Here we are plotting the unnormalised qPCR data for the constructs containing pRPS3 driving the expression of mCherry. All -RT samples appear to have high Cq values and all +RT samples have Cq values below 20 cycles. There is however a clear difference in the Cq values between experimental replicates (Experimental replicate 1 -Biorep 1, 2, 3)(Experimental replicate 2 -Biorep 4, 5, 6). Experimental replicate 1 seems to have lower Cq values across all primers and strains than experimental replicate 2.
The results for modE suggest that there may be a plate position effect for these consecutive runs (BioRep 2 and 5 consistently higher despite no clear differences across other constructs)
Here we are plotting the unnormalised qPCR data for the constructs containing pPGK1 driving the expression of mCherry. All -RT samples appear to have high Cq values and all +RT samples have Cq values below 20 cycles. BioRep 2 (of Experimental replicate 1) for the pPGK1-mCherry-tRPS3_WT strain seems to show high Cq values (>20 cycles) across all the probes and technical replicates suggesting a problem with the sample processing. Therefore, in further analysis, the data for this biorep of this strain will be excluded.
Variability for WT seems high but taking the median should offset outliers (mostly 2 replicate together and 1 outlier)
Here we are plotting the unnormalised qPCR data for the negative control strain (POT1-ccdB - strain containing the backbone plasmid without the mCherry cassette). BioReps 1,2,3 have a low (<20) Cq value for the POT1-ccdB strains with the mCh-7 Probe, which is not good because there is no mCherry target in this strain. As a comparison, I have plotted the pRPS3-mCherry-tRPS3_WT strain (which is positive for the mCherry target).
As observed in the previous plots, all the Cq vales for Bioreps 1, 2 and 3 (all from Experimental replicate 1) are lower than that of Bioreps 4, 5 and 6 (all from Experimental replicate 2). Interestingly, the difference between Cq value of ExpRep 1 and ExpRep2 are not the same across strains and with different targets (difference in mCh-7 of POT1-ccdB is larger than the rest)
NOTE - the mCherry is having off-target amplification/template contamination, with a very pronounced difference from different days.
Here we are plotting the unnormalised qPCR data for the negative control strain (POT1-ccdB - strain containing the backbone plasmid without the mCherry cassette). Unlike the previous plot showing the control for the pRPS3 experiments, we don’t see the same difference between biological replicates in pPGK1 experiments
platecurveR3_1 <- read_tsv("data/JA_20200121-pRPS3-tRPS3mod-n1.txt",skip=2,
col_names=c("Well","SID","Program","Segment","Cycle","Time","Temperature","Fluor")) %>%
debaseline() %>%left_join(plateplanR3_1)%>%
mutate(ExpRep = 1,ExpRep=factor(ExpRep))
platecurveR3_2 <- read_tsv("data/JA_20200204-pRPS3-tRPS3mod-n2.txt",skip=2,
col_names=c("Well","SID","Program","Segment","Cycle","Time","Temperature","Fluor")) %>%
debaseline() %>%left_join(plateplanR3_2)%>%
mutate(ExpRep = 2,ExpRep=factor(ExpRep))
platecurveR3 <- bind_rows(platecurveR3_1, platecurveR3_2)
platesampR3 <- platecurveR3 %>% filter(Program == 2)
platesmeltR3 <- platecurveR3 %>% filter(Program != 2) %>% getdRdTall() %>% filter(Temperature >= 61)
head(platesampR3)
## # A tibble: 6 x 26
## Well SID Program Segment Cycle Time Temperature Fluor Base Signal WellR
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <fct>
## 1 A1 Samp… 2 2 1 233670 59.9 0.93 0.94 -0.0100 A
## 2 A1 Samp… 2 2 2 273130 59.8 0.94 0.94 0 A
## 3 A1 Samp… 2 2 3 312530 59.8 0.92 0.94 -0.0200 A
## 4 A1 Samp… 2 2 4 351930 59.8 0.94 0.94 0 A
## 5 A1 Samp… 2 2 5 391320 59.8 0.92 0.94 -0.0200 A
## 6 A1 Samp… 2 2 6 430720 59.8 0.93 0.94 -0.0100 A
## # … with 15 more variables: WellC <fct>, SampleID <chr>, Strain <fct>,
## # Pro_mCh <chr>, Promoter <chr>, mCherry <chr>, BioRep <chr>, Ter_mod <chr>,
## # Terminator <chr>, Construct <fct>, remove <lgl>, Type <fct>, TechRep <fct>,
## # TargetID <fct>, ExpRep <chr>
head(platesmeltR3)
## # A tibble: 6 x 27
## Well SID Program Segment Cycle Time Temperature Fluor Base Signal WellR
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <fct>
## 1 A1 Samp… 3 1 1 2.19e6 61.2 7.06 0.97 6.09 A
## 2 A1 Samp… 3 1 1 2.19e6 61.2 6.96 0.94 6.02 A
## 3 A1 Samp… 3 1 1 2.19e6 61.4 7.03 0.97 6.06 A
## 4 A1 Samp… 3 1 1 2.19e6 61.4 6.92 0.94 5.98 A
## 5 A1 Samp… 3 1 1 2.19e6 61.6 6.92 0.94 5.98 A
## 6 A1 Samp… 3 1 1 2.19e6 61.6 6.99 0.97 6.02 A
## # … with 16 more variables: WellC <fct>, SampleID <chr>, Strain <fct>,
## # Pro_mCh <chr>, Promoter <chr>, mCherry <chr>, BioRep <chr>, Ter_mod <chr>,
## # Terminator <chr>, Construct <fct>, remove <lgl>, Type <fct>, TechRep <fct>,
## # TargetID <fct>, ExpRep <chr>, dRdT <dbl>
Here I am comparing the amplification curves of POT1-ccdB strains in pRPS3 experiments between experimental replicates (ExpRep1 in red, ExpRep2 in blue). Looking only at the mCh-7 amplification curves for each BioRep, it seems that BioRep1, 2 and 3 have an early Cq value (reaches exponential phase at an earlier cycle) than BioRep4, 5 and 6. However, across all amplification curves against the mCherry target, the -RT either does not have a fluorecence signal (flat dotted line) or a late Cq value (fluorescence signal at a late cycle). So there doesn’t seem to be a problem with samples based on the amplification curves.
NOTE - shallow curves seems to be related to including a high cDNA volume
Here I am comparing the melt curves of POT1-ccdB and pRPS3-mCherry-tRPS3_WT strains in pRPS3 experiments between experimental replicates (ExpRep1 in red, ExpRep2 in blue).The melt curves with PGK1-ORF, RPS3-ORF and URA3-ORF probes look fine (with only 1 peak). The melt curves of the pRPS3-mCherry-tRPS3_WT show a peak at ~85C however a peak shows up at ~75C in POT1-ccdB strains which was not in the pRPS3-mCherry-tRPS3_WT strains. Apart from this, everything looks normal.
platecurveP1_1 <- read_tsv("data/JA_20200221_pPGK1-tRPS3mod-n1.txt",skip=2,
col_names=c("Well","SID","Program","Segment","Cycle","Time","Temperature","Fluor")) %>%
debaseline() %>%left_join(plateplanP1_1)%>%
mutate(ExpRep = 1,ExpRep=factor(ExpRep))
platecurveP1_2 <- read_tsv("data/JA_20200204-pRPS3-tRPS3mod-n2.txt",skip=2,
col_names=c("Well","SID","Program","Segment","Cycle","Time","Temperature","Fluor")) %>%
debaseline() %>%left_join(plateplanP1_2)%>%
mutate(ExpRep = 2,ExpRep=factor(ExpRep))
platecurveP1 <- bind_rows(platecurveP1_1, platecurveP1_2)
platesampP1 <- platecurveP1 %>% filter(Program == 2)
platesmeltP1 <- platecurveP1 %>% filter(Program != 2) %>% getdRdTall() %>% filter(Temperature >= 61)
Here I am comparing the amplification curves of POT1-ccdB strains in pRPS3 experiments between experimental replicates (ExpRep1 in red, ExpRep2 in blue). Looking only at the mCh-7 amplification curves for each BioRep, it seems that BioRep1, 2 and 3 have an early Cq value (reaches exponential phase at an earlier cycle) than BioRep4, 5 and 6. However, across all amplification curves against the mCherry target, the -RT either does not have a fluorecence signal (flat dotted line) or a late Cq value (fluorescence signal at a late cycle). So there doesn’t seem to be a problem with samples based on the amplification curves.
NOTE - shallow curves seems to be related to including a high cDNA volume (seemed to clear up when I added more RNA to cDNA reaction then used less of the reaction for qPCR)
Here I am comparing the melt curves of POT1-ccdB and pRPS3-mCherry-tRPS3_WT strains in pRPS3 experiments between experimental replicates (ExpRep1 in red, ExpRep2 in blue).The melt curves with PGK1-ORF, RPS3-ORF and URA3-ORF probes look fine (with only 1 peak). The melt curves of the pRPS3-mCherry-tRPS3_WT show a peak at ~85C however a peak shows up at ~75C in POT1-ccdB strains which was not in the pRPS3-mCherry-tRPS3_WT strains. Apart from this, everything looks normal.
Normalisation of mCherry Cq values against PGK1-ORF and RPS3-ORF Cq values. This calculation takes the median of normTargetIDs (getNormCq function default is median)
# platesnorm first excludes pPGK1-mCherry-tRPS3_WT_BioRep2, and all POT1-ccdB strains, then takes all +RT results, then normalises the Cq values by the median of normTargetIDs, then filters Cq values for mCh-7
platesnorm <- plates %>%
filter(!SampleID %in% c("pPGK1-mCherry-tRPS3_WT_BioRep2"), !Strain %in% c("POT1-ccdB"), Type=="+RT") %>%
normalizeqPCR(normTargetIDs = c("PGK1-ORF", "RPS3-ORF"))
# to verify the calculation done
platesnorm %>% select(Strain, BioRep, TechRep, Value.norm, Value.normexp)
## # A tibble: 996 x 5
## Strain BioRep TechRep Value.norm Value.normexp
## <chr> <chr> <fct> <dbl> <dbl>
## 1 pPGK1-mCherry-tRPS3_mod0 BioRep1 1 -2.84 7.16
## 2 pPGK1-mCherry-tRPS3_mod0 BioRep1 1 0.180 0.883
## 3 pPGK1-mCherry-tRPS3_mod0 BioRep1 1 0.29 0.818
## 4 pPGK1-mCherry-tRPS3_mod0 BioRep1 1 -0.0600 1.04
## 5 pPGK1-mCherry-tRPS3_mod0 BioRep1 2 -2.55 5.86
## 6 pPGK1-mCherry-tRPS3_mod0 BioRep1 2 0.11 0.927
## 7 pPGK1-mCherry-tRPS3_mod0 BioRep1 2 0.260 0.835
## 8 pPGK1-mCherry-tRPS3_mod0 BioRep1 2 -0.470 1.39
## 9 pPGK1-mCherry-tRPS3_mod0 BioRep1 3 -2.58 5.98
## 10 pPGK1-mCherry-tRPS3_mod0 BioRep1 3 -0.180 1.13
## # … with 986 more rows
ggplot(platesnorm, aes(Ter_mod,Value.norm))+
geom_point(aes(color=BioRep),position=position_dodge(width = 0.85),size=1.2, alpha=0.7)+
scale_colour_hue(h = c(90, 360)+20,l=60,c=60)+
labs(y="delta Cq", x="3'UTR-terminators")+
facet_wrap(~TargetID)+
theme(axis.text.x=element_text(angle=90,vjust=0.5))+
geom_hline(yintercept = 0, color = "black", linetype= 'dotted', size=1)
#exporting platesnorm dataframe
write.csv(platesnorm,"analysed_data/pRPS3_pPGK1_tRPS3mod/deltaCq_platesnorm.csv", row.names = FALSE)
Plot shows shifted distributions in normalised Cq values for pRPS3 samples between experimental replciates. This shift in distributions between experimental replicates is not seen for pPGK1 samples.
ggplot(platesnorm %>% filter(TargetID %in% 'mCh-7'), aes(Ter_mod,Value.norm))+
geom_point(aes(color=ExpRep),position=position_dodge(width = 0.85),size=1.2, alpha=1)+
scale_colour_hue(h = c(90, 360)+20,l=60,c=60)+
labs(y="delta Cq", x="3'UTR-terminators")+
facet_wrap(~Promoter)+
theme(axis.text.x=element_text(angle=90,vjust=0.5))+
geom_hline(yintercept = 0, color = "black", linetype= 'dotted', size=1)
Normalisation of delta Cq values against tRPS3-mod0 delta Cq values. Strains are first subdivided based on their promoter (either pPGK1 or pRPS3).
pRPS3-mCherry-tRPS3_mod0 datapoints were divided into two based on ExpRep. From this, two (depending on ExpRep) Mean Value.norm of pRPS3-mCherry-tRPS3_mod0 were calculated by taking the median Value.norm among TechReps of each BioRep (of pRPS3-mCherry-tRPS3_mod0), then calculating two mean Value.norm among BioReps of pRPS3-mCherry-tRPS3_mod0 for each ExpRep.
pRPS3 datapoints were subdivided based on ExpRep. Delta delta Cq is calculated by subtracting the Mean Value.norm of pRPS3-mCherry-tRPS3_mod0 of ExpRep1 from each Value.norm of all other strains in ExpRep1. Delta delta Cq is calculated by subtracting the Mean Value.norm of pRPS3-mCherry-tRPS3_mod0 of ExpRep2 from each Value.norm of all other strains in ExpRep2. (NOTE - we still have one Value.norm for each TechRep and BioRep here).
NOTE - Here median is used to summarise/collapse TechReps and mean is used to summarise/collapse BioReps
# Extracts the pRPS3 strains
platesnorm_pRPS3_ExpRep <- platesnorm %>% filter(Promoter %in% "pRPS3", TargetID %in% "mCh-7")
# Calculates the mean Cq value of pRPS3-mCherry-tRPS3_mod0 Samples (-0.1133333)
mean_platesnorm_pRPS3mod0_ExpRep1 <- platesnorm_pRPS3_ExpRep %>% filter(ExpRep==1)%>%
select(c("Strain","Value.norm", "BioRep", "TechRep")) %>%
filter(Strain %in% c("pRPS3-mCherry-tRPS3_mod0")) %>%
group_by(Strain, BioRep)%>%
summarize(median_BioRep_mod0 = median(Value.norm)) %>%
ungroup()%>%
group_by(Strain)%>%
summarize(mean_mod0 = mean(median_BioRep_mod0))
# Calculates the mean Cq value of pRPS3-mCherry-tRPS3_mod0 Samples (-1.236667)
mean_platesnorm_pRPS3mod0_ExpRep2 <- platesnorm_pRPS3_ExpRep %>% filter(ExpRep==2)%>%
select(c("Strain","Value.norm", "BioRep", "TechRep")) %>%
filter(Strain %in% c("pRPS3-mCherry-tRPS3_mod0")) %>%
group_by(Strain, BioRep)%>%
summarize(median_BioRep_mod0 = median(Value.norm)) %>%
ungroup()%>%
group_by(Strain)%>%
summarize(mean_mod0 = mean(median_BioRep_mod0))
# Calculates the delta delta Cq (subtracts mean(pRPS3mod0$Value.norm) from every Value.norm))
platesnorm_mod0_pRPS3_ExpRep1 <- platesnorm_pRPS3_ExpRep %>% filter(ExpRep==1)%>%
mutate(Value.norm.mod0 = Value.norm - mean_platesnorm_pRPS3mod0_ExpRep1$mean_mod0, remove=FALSE)
platesnorm_mod0_pRPS3_ExpRep2 <- platesnorm_pRPS3_ExpRep %>% filter(ExpRep==2)%>%
mutate(Value.norm.mod0 = Value.norm - mean_platesnorm_pRPS3mod0_ExpRep2$mean_mod0, remove=FALSE)
pPGK1-mCherry-tRPS3_mod0 datapoints were divided into two based on ExpRep. From this, two (depending on ExpRep) Mean Value.norm of pPGK1-mCherry-tRPS3_mod0 were calculated by taking the median Value.norm among TechReps of each BioRep (of pPGK1-mCherry-tRPS3_mod0), then calculating two mean Value.norm among BioReps of pPGK1-mCherry-tRPS3_mod0 for each ExpRep.
pPGK1 datapoints were subdivided based on ExpRep. Delta delta Cq is calculated by subtracting the Mean Value.norm of pPGK1-mCherry-tRPS3_mod0 of ExpRep1 from each Value.norm of all other strains in ExpRep1. Delta delta Cq is calculated by subtracting the Mean Value.norm of pPGK1-mCherry-tRPS3_mod0 of ExpRep2 from each Value.norm of all other strains in ExpRep2. (NOTE - we still have one Value.norm for each TechRep and BioRep here).
NOTE - Here median is used to summarise/collapse TechReps and mean is used to summarise/collapse BioReps
# Extracts the pRPS3 strains
platesnorm_pPGK1_ExpRep <- platesnorm %>% filter(Promoter %in% "pPGK1", TargetID %in% "mCh-7")
# Calculates the mean Cq value of pPGK1-mCherry-tRPS3_mod0 Samples (-2.158333)
mean_platesnorm_pPGK1mod0_ExpRep1 <- platesnorm_pPGK1_ExpRep %>% filter(ExpRep==1)%>%
select(c("Strain","Value.norm", "BioRep", "TechRep")) %>%
filter(Strain %in% c("pPGK1-mCherry-tRPS3_mod0")) %>%
group_by(Strain, BioRep)%>%
summarize(median_BioRep_mod0 = median(Value.norm)) %>%
ungroup()%>%
group_by(Strain)%>%
summarize(mean_mod0 = mean(median_BioRep_mod0))
# Calculates the mean Cq value of pPGK1-mCherry-tRPS3_mod0 Samples (-2.136667)
mean_platesnorm_pPGK1mod0_ExpRep2 <- platesnorm_pPGK1_ExpRep %>% filter(ExpRep==2)%>%
select(c("Strain","Value.norm", "BioRep", "TechRep")) %>%
filter(Strain %in% c("pPGK1-mCherry-tRPS3_mod0")) %>%
group_by(Strain, BioRep)%>%
summarize(median_BioRep_mod0 = median(Value.norm)) %>%
ungroup()%>%
group_by(Strain)%>%
summarize(mean_mod0 = mean(median_BioRep_mod0))
# Calculates the delta delta Cq (subtracts mean(pPGK1mod0$Value.norm) from every Value.norm))
platesnorm_mod0_pPGK1_ExpRep1 <- platesnorm_pPGK1_ExpRep %>% filter(ExpRep==1)%>%
mutate(Value.norm.mod0 = Value.norm - mean_platesnorm_pPGK1mod0_ExpRep1$mean_mod0, remove=FALSE)
platesnorm_mod0_pPGK1_ExpRep2 <- platesnorm_pPGK1_ExpRep %>% filter(ExpRep==2)%>%
mutate(Value.norm.mod0 = Value.norm - mean_platesnorm_pPGK1mod0_ExpRep2$mean_mod0, remove=FALSE)
In the previous 2 chunks, we have calculated the delta-delta Cq value for each techrep. Here, we are summarising that information by calculating the median Cq for each biorep and calculating the RNA abundance (2^-Median_Cq).
# Combining the calculated delta-delta Cq from the two dataframes then calculating the Median delta-delta Cq. RNA abundance is calculated by the following formula 2^(- Median_Cq).
platesnorm_mod0_median_ExpRep <- bind_rows(platesnorm_mod0_pRPS3_ExpRep1, platesnorm_mod0_pRPS3_ExpRep2, platesnorm_mod0_pPGK1_ExpRep1, platesnorm_mod0_pPGK1_ExpRep2)%>%
group_by(Strain, TargetID, BioRep, ExpRep)%>%
summarize(Median_Cq = median(Value.norm.mod0, na.rm=TRUE),
RNA_Abundance = (2^-Median_Cq), na.rm=FALSE)%>%
separate(Strain, remove = FALSE,sep="-",into=c("Promoter","mCherry","Terminator")) %>%
separate(Terminator, remove = FALSE, sep="_",into=c("Terminator","Construct")) %>%
mutate(Construct = factor(Construct,levels = c("modE","modD","modC","modB","modA","mod0","WT")),remove = FALSE)%>%
unite(Pro_mCh,Promoter,mCherry,sep="-", remove=FALSE)%>%
unite(Ter_mod,Terminator,Construct,sep="_", remove=FALSE) %>%
mutate(Pro_mCh = factor(Pro_mCh,levels = c("pRPS3-mCherry","pPGK1-mCherry"))) %>%
mutate(Ter_mod = factor(Ter_mod,levels=c("tRPS3_modC","tRPS3_modE","tRPS3_modD","tRPS3_modA",
"tRPS3_modB","tRPS3_mod0","tRPS3_WT")))